package cn.tedu.boot414.mapper;

import cn.tedu.boot414.entity.Person;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface PersonMapper {

    @Insert("insert into person values(null,#{name},#{title},#{wks},#{world})")
    void insert(Person person);

    @Select("select * from person")
    List<Person> select();

    @Delete("delete from person where id =#{id}")
    void deleteById(int id);

    @Select("select * from person where id =#{id}")
    Person selectById(int id);

    @Update("update person set name=#{name},title=#{title},wks=#{wks},world=#{world} where id=#{id}")
    void update(Person person);
}
